{"ast":null,"code":"import warning from \"rc-util/es/warning\";\nfunction removeFromCheckedKeys(halfCheckedKeys, checkedKeys) {\n  var filteredKeys = new Set();\n  halfCheckedKeys.forEach(function (key) {\n    if (!checkedKeys.has(key)) {\n      filteredKeys.add(key);\n    }\n  });\n  return filteredKeys;\n}\nexport function isCheckDisabled(node) {\n  var _ref = node || {},\n    disabled = _ref.disabled,\n    disableCheckbox = _ref.disableCheckbox,\n    checkable = _ref.checkable;\n  return !!(disabled || disableCheckbox) || checkable === false;\n}\n// Fill miss keys\nfunction fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled) {\n  var checkedKeys = new Set(keys);\n  var halfCheckedKeys = new Set();\n  // Add checked keys top to bottom\n  for (var level = 0; level <= maxLevel; level += 1) {\n    var entities = levelEntities.get(level) || new Set();\n    entities.forEach(function (entity) {\n      var key = entity.key,\n        node = entity.node,\n        _entity$children = entity.children,\n        children = _entity$children === void 0 ? [] : _entity$children;\n      if (checkedKeys.has(key) && !syntheticGetCheckDisabled(node)) {\n        children.filter(function (childEntity) {\n          return !syntheticGetCheckDisabled(childEntity.node);\n        }).forEach(function (childEntity) {\n          checkedKeys.add(childEntity.key);\n        });\n      }\n    });\n  }\n  // Add checked keys from bottom to top\n  var visitedKeys = new Set();\n  for (var _level = maxLevel; _level >= 0; _level -= 1) {\n    var _entities = levelEntities.get(_level) || new Set();\n    _entities.forEach(function (entity) {\n      var parent = entity.parent,\n        node = entity.node;\n      // Skip if no need to check\n      if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {\n        return;\n      }\n      // Skip if parent is disabled\n      if (syntheticGetCheckDisabled(entity.parent.node)) {\n        visitedKeys.add(parent.key);\n        return;\n      }\n      var allChecked = true;\n      var partialChecked = false;\n      (parent.children || []).filter(function (childEntity) {\n        return !syntheticGetCheckDisabled(childEntity.node);\n      }).forEach(function (_ref2) {\n        var key = _ref2.key;\n        var checked = checkedKeys.has(key);\n        if (allChecked && !checked) {\n          allChecked = false;\n        }\n        if (!partialChecked && (checked || halfCheckedKeys.has(key))) {\n          partialChecked = true;\n        }\n      });\n      if (allChecked) {\n        checkedKeys.add(parent.key);\n      }\n      if (partialChecked) {\n        halfCheckedKeys.add(parent.key);\n      }\n      visitedKeys.add(parent.key);\n    });\n  }\n  return {\n    checkedKeys: Array.from(checkedKeys),\n    halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))\n  };\n}\n// Remove useless key\nfunction cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGetCheckDisabled) {\n  var checkedKeys = new Set(keys);\n  var halfCheckedKeys = new Set(halfKeys);\n  // Remove checked keys from top to bottom\n  for (var level = 0; level <= maxLevel; level += 1) {\n    var entities = levelEntities.get(level) || new Set();\n    entities.forEach(function (entity) {\n      var key = entity.key,\n        node = entity.node,\n        _entity$children2 = entity.children,\n        children = _entity$children2 === void 0 ? [] : _entity$children2;\n      if (!checkedKeys.has(key) && !halfCheckedKeys.has(key) && !syntheticGetCheckDisabled(node)) {\n        children.filter(function (childEntity) {\n          return !syntheticGetCheckDisabled(childEntity.node);\n        }).forEach(function (childEntity) {\n          checkedKeys.delete(childEntity.key);\n        });\n      }\n    });\n  }\n  // Remove checked keys form bottom to top\n  halfCheckedKeys = new Set();\n  var visitedKeys = new Set();\n  for (var _level2 = maxLevel; _level2 >= 0; _level2 -= 1) {\n    var _entities2 = levelEntities.get(_level2) || new Set();\n    _entities2.forEach(function (entity) {\n      var parent = entity.parent,\n        node = entity.node;\n      // Skip if no need to check\n      if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {\n        return;\n      }\n      // Skip if parent is disabled\n      if (syntheticGetCheckDisabled(entity.parent.node)) {\n        visitedKeys.add(parent.key);\n        return;\n      }\n      var allChecked = true;\n      var partialChecked = false;\n      (parent.children || []).filter(function (childEntity) {\n        return !syntheticGetCheckDisabled(childEntity.node);\n      }).forEach(function (_ref3) {\n        var key = _ref3.key;\n        var checked = checkedKeys.has(key);\n        if (allChecked && !checked) {\n          allChecked = false;\n        }\n        if (!partialChecked && (checked || halfCheckedKeys.has(key))) {\n          partialChecked = true;\n        }\n      });\n      if (!allChecked) {\n        checkedKeys.delete(parent.key);\n      }\n      if (partialChecked) {\n        halfCheckedKeys.add(parent.key);\n      }\n      visitedKeys.add(parent.key);\n    });\n  }\n  return {\n    checkedKeys: Array.from(checkedKeys),\n    halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))\n  };\n}\n/**\n * Conduct with keys.\n * @param keyList current key list\n * @param keyEntities key - dataEntity map\n * @param mode `fill` to fill missing key, `clean` to remove useless key\n */\nexport function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {\n  var warningMissKeys = [];\n  var syntheticGetCheckDisabled;\n  if (getCheckDisabled) {\n    syntheticGetCheckDisabled = getCheckDisabled;\n  } else {\n    syntheticGetCheckDisabled = isCheckDisabled;\n  }\n  // We only handle exist keys\n  var keys = new Set(keyList.filter(function (key) {\n    var hasEntity = !!keyEntities[key];\n    if (!hasEntity) {\n      warningMissKeys.push(key);\n    }\n    return hasEntity;\n  }));\n  var levelEntities = new Map();\n  var maxLevel = 0;\n  // Convert entities by level for calculation\n  Object.keys(keyEntities).forEach(function (key) {\n    var entity = keyEntities[key];\n    var level = entity.level;\n    var levelSet = levelEntities.get(level);\n    if (!levelSet) {\n      levelSet = new Set();\n      levelEntities.set(level, levelSet);\n    }\n    levelSet.add(entity);\n    maxLevel = Math.max(maxLevel, level);\n  });\n  warning(!warningMissKeys.length, \"Tree missing follow keys: \".concat(warningMissKeys.slice(0, 100).map(function (key) {\n    return \"'\".concat(key, \"'\");\n  }).join(', ')));\n  var result;\n  if (checked === true) {\n    result = fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled);\n  } else {\n    result = cleanConductCheck(keys, checked.halfCheckedKeys, levelEntities, maxLevel, syntheticGetCheckDisabled);\n  }\n  return result;\n}","map":{"version":3,"names":["warning","removeFromCheckedKeys","halfCheckedKeys","checkedKeys","filteredKeys","Set","forEach","key","has","add","isCheckDisabled","node","_ref","disabled","disableCheckbox","checkable","fillConductCheck","keys","levelEntities","maxLevel","syntheticGetCheckDisabled","level","entities","get","entity","_entity$children","children","filter","childEntity","visitedKeys","_level","_entities","parent","allChecked","partialChecked","_ref2","checked","Array","from","cleanConductCheck","halfKeys","_entity$children2","delete","_level2","_entities2","_ref3","conductCheck","keyList","keyEntities","getCheckDisabled","warningMissKeys","hasEntity","push","Map","Object","levelSet","set","Math","max","length","concat","slice","map","join","result"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-tree/es/utils/conductUtil.js"],"sourcesContent":["import warning from \"rc-util/es/warning\";\nfunction removeFromCheckedKeys(halfCheckedKeys, checkedKeys) {\n  var filteredKeys = new Set();\n  halfCheckedKeys.forEach(function (key) {\n    if (!checkedKeys.has(key)) {\n      filteredKeys.add(key);\n    }\n  });\n  return filteredKeys;\n}\nexport function isCheckDisabled(node) {\n  var _ref = node || {},\n    disabled = _ref.disabled,\n    disableCheckbox = _ref.disableCheckbox,\n    checkable = _ref.checkable;\n  return !!(disabled || disableCheckbox) || checkable === false;\n}\n// Fill miss keys\nfunction fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled) {\n  var checkedKeys = new Set(keys);\n  var halfCheckedKeys = new Set();\n  // Add checked keys top to bottom\n  for (var level = 0; level <= maxLevel; level += 1) {\n    var entities = levelEntities.get(level) || new Set();\n    entities.forEach(function (entity) {\n      var key = entity.key,\n        node = entity.node,\n        _entity$children = entity.children,\n        children = _entity$children === void 0 ? [] : _entity$children;\n      if (checkedKeys.has(key) && !syntheticGetCheckDisabled(node)) {\n        children.filter(function (childEntity) {\n          return !syntheticGetCheckDisabled(childEntity.node);\n        }).forEach(function (childEntity) {\n          checkedKeys.add(childEntity.key);\n        });\n      }\n    });\n  }\n  // Add checked keys from bottom to top\n  var visitedKeys = new Set();\n  for (var _level = maxLevel; _level >= 0; _level -= 1) {\n    var _entities = levelEntities.get(_level) || new Set();\n    _entities.forEach(function (entity) {\n      var parent = entity.parent,\n        node = entity.node;\n      // Skip if no need to check\n      if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {\n        return;\n      }\n      // Skip if parent is disabled\n      if (syntheticGetCheckDisabled(entity.parent.node)) {\n        visitedKeys.add(parent.key);\n        return;\n      }\n      var allChecked = true;\n      var partialChecked = false;\n      (parent.children || []).filter(function (childEntity) {\n        return !syntheticGetCheckDisabled(childEntity.node);\n      }).forEach(function (_ref2) {\n        var key = _ref2.key;\n        var checked = checkedKeys.has(key);\n        if (allChecked && !checked) {\n          allChecked = false;\n        }\n        if (!partialChecked && (checked || halfCheckedKeys.has(key))) {\n          partialChecked = true;\n        }\n      });\n      if (allChecked) {\n        checkedKeys.add(parent.key);\n      }\n      if (partialChecked) {\n        halfCheckedKeys.add(parent.key);\n      }\n      visitedKeys.add(parent.key);\n    });\n  }\n  return {\n    checkedKeys: Array.from(checkedKeys),\n    halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))\n  };\n}\n// Remove useless key\nfunction cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGetCheckDisabled) {\n  var checkedKeys = new Set(keys);\n  var halfCheckedKeys = new Set(halfKeys);\n  // Remove checked keys from top to bottom\n  for (var level = 0; level <= maxLevel; level += 1) {\n    var entities = levelEntities.get(level) || new Set();\n    entities.forEach(function (entity) {\n      var key = entity.key,\n        node = entity.node,\n        _entity$children2 = entity.children,\n        children = _entity$children2 === void 0 ? [] : _entity$children2;\n      if (!checkedKeys.has(key) && !halfCheckedKeys.has(key) && !syntheticGetCheckDisabled(node)) {\n        children.filter(function (childEntity) {\n          return !syntheticGetCheckDisabled(childEntity.node);\n        }).forEach(function (childEntity) {\n          checkedKeys.delete(childEntity.key);\n        });\n      }\n    });\n  }\n  // Remove checked keys form bottom to top\n  halfCheckedKeys = new Set();\n  var visitedKeys = new Set();\n  for (var _level2 = maxLevel; _level2 >= 0; _level2 -= 1) {\n    var _entities2 = levelEntities.get(_level2) || new Set();\n    _entities2.forEach(function (entity) {\n      var parent = entity.parent,\n        node = entity.node;\n      // Skip if no need to check\n      if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {\n        return;\n      }\n      // Skip if parent is disabled\n      if (syntheticGetCheckDisabled(entity.parent.node)) {\n        visitedKeys.add(parent.key);\n        return;\n      }\n      var allChecked = true;\n      var partialChecked = false;\n      (parent.children || []).filter(function (childEntity) {\n        return !syntheticGetCheckDisabled(childEntity.node);\n      }).forEach(function (_ref3) {\n        var key = _ref3.key;\n        var checked = checkedKeys.has(key);\n        if (allChecked && !checked) {\n          allChecked = false;\n        }\n        if (!partialChecked && (checked || halfCheckedKeys.has(key))) {\n          partialChecked = true;\n        }\n      });\n      if (!allChecked) {\n        checkedKeys.delete(parent.key);\n      }\n      if (partialChecked) {\n        halfCheckedKeys.add(parent.key);\n      }\n      visitedKeys.add(parent.key);\n    });\n  }\n  return {\n    checkedKeys: Array.from(checkedKeys),\n    halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))\n  };\n}\n/**\n * Conduct with keys.\n * @param keyList current key list\n * @param keyEntities key - dataEntity map\n * @param mode `fill` to fill missing key, `clean` to remove useless key\n */\nexport function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {\n  var warningMissKeys = [];\n  var syntheticGetCheckDisabled;\n  if (getCheckDisabled) {\n    syntheticGetCheckDisabled = getCheckDisabled;\n  } else {\n    syntheticGetCheckDisabled = isCheckDisabled;\n  }\n  // We only handle exist keys\n  var keys = new Set(keyList.filter(function (key) {\n    var hasEntity = !!keyEntities[key];\n    if (!hasEntity) {\n      warningMissKeys.push(key);\n    }\n    return hasEntity;\n  }));\n  var levelEntities = new Map();\n  var maxLevel = 0;\n  // Convert entities by level for calculation\n  Object.keys(keyEntities).forEach(function (key) {\n    var entity = keyEntities[key];\n    var level = entity.level;\n    var levelSet = levelEntities.get(level);\n    if (!levelSet) {\n      levelSet = new Set();\n      levelEntities.set(level, levelSet);\n    }\n    levelSet.add(entity);\n    maxLevel = Math.max(maxLevel, level);\n  });\n  warning(!warningMissKeys.length, \"Tree missing follow keys: \".concat(warningMissKeys.slice(0, 100).map(function (key) {\n    return \"'\".concat(key, \"'\");\n  }).join(', ')));\n  var result;\n  if (checked === true) {\n    result = fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled);\n  } else {\n    result = cleanConductCheck(keys, checked.halfCheckedKeys, levelEntities, maxLevel, syntheticGetCheckDisabled);\n  }\n  return result;\n}"],"mappings":"AAAA,OAAOA,OAAO,MAAM,oBAAoB;AACxC,SAASC,qBAAqB,CAACC,eAAe,EAAEC,WAAW,EAAE;EAC3D,IAAIC,YAAY,GAAG,IAAIC,GAAG,EAAE;EAC5BH,eAAe,CAACI,OAAO,CAAC,UAAUC,GAAG,EAAE;IACrC,IAAI,CAACJ,WAAW,CAACK,GAAG,CAACD,GAAG,CAAC,EAAE;MACzBH,YAAY,CAACK,GAAG,CAACF,GAAG,CAAC;IACvB;EACF,CAAC,CAAC;EACF,OAAOH,YAAY;AACrB;AACA,OAAO,SAASM,eAAe,CAACC,IAAI,EAAE;EACpC,IAAIC,IAAI,GAAGD,IAAI,IAAI,CAAC,CAAC;IACnBE,QAAQ,GAAGD,IAAI,CAACC,QAAQ;IACxBC,eAAe,GAAGF,IAAI,CAACE,eAAe;IACtCC,SAAS,GAAGH,IAAI,CAACG,SAAS;EAC5B,OAAO,CAAC,EAAEF,QAAQ,IAAIC,eAAe,CAAC,IAAIC,SAAS,KAAK,KAAK;AAC/D;AACA;AACA,SAASC,gBAAgB,CAACC,IAAI,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,yBAAyB,EAAE;EAClF,IAAIjB,WAAW,GAAG,IAAIE,GAAG,CAACY,IAAI,CAAC;EAC/B,IAAIf,eAAe,GAAG,IAAIG,GAAG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